package com.qsxc.dao.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 学员服务购买记录表
 * </p>
 *
 * @author 
 * @since 2024-10-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SmUserPayRecord对象", description="学员服务购买记录表")
public class SmUserPayRecord extends Model<SmUserPayRecord> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private Long createdBy;

    @TableField(value = "created_date", fill = FieldFill.INSERT)
    private Date createdDate;

    @TableField(value = "last_updated_by", fill = FieldFill.UPDATE)
    private Long lastUpdatedBy;

    @TableField(value = "last_updated_date", fill = FieldFill.UPDATE)
    private Date lastUpdatedDate;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "1: VIP 2:远程教育 3:模拟器")
    @TableField("order_type")
    private String orderType;

    @ApiModelProperty(value = "订单金额(服务产品单价)")
    @TableField("order_money")
    private BigDecimal orderMoney;

    @ApiModelProperty(value = "付款金额")
    @TableField("amount_money")
    private BigDecimal amountMoney;

    @ApiModelProperty(value = "付款时间")
    @TableField("pay_time")
    private Date payTime;

    @ApiModelProperty(value = "有效天数")
    @TableField("valid_days")
    private Integer validDays;

    @ApiModelProperty(value = "赠送天数")
    @TableField("gift_days")
    private Integer giftDays;

    @ApiModelProperty(value = "科目 1科目一 2科目二 3科目三 4科目四 5全科目")
    @TableField("subject_type")
    private String subjectType;

    @ApiModelProperty(value = "支付订单号(内部使用)")
    @TableField("pay_batch_no")
    private String payBatchNo;

    @ApiModelProperty(value = "付款流水号,支付宝或者微信交流流水")
    @TableField("trade_no")
    private String tradeNo;

    @ApiModelProperty(value = "订单状态 0、未付款  1、已付款  9、已退费")
    @TableField("order_status")
    private String orderStatus;

    @ApiModelProperty(value = "支付方式 1支付宝 2微信")
    @TableField("pay_type")
    private String payType;

    @ApiModelProperty(value = "退费时间")
    @TableField("refund_time")
    private Date refundTime;

    @ApiModelProperty(value = "退费金额")
    @TableField("refund_money")
    private BigDecimal refundMoney;

    @ApiModelProperty(value = "支付到账时间")
    @TableField("pay_end")
    private Date payEnd;

    @ApiModelProperty(value = "购买VIP(sm_user_vip_config.id)")
    @TableField("vip_id")
    private Long vipId;

    @ApiModelProperty(value = "推广员sm_promoter_user.id")
    @TableField("promoter_id")
    private Long promoterId;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "1表示有效 0表示无效")
    @TableField("status")
    private String status;


    public static final String ID = "id";

    public static final String CREATED_BY = "created_by";

    public static final String CREATED_DATE = "created_date";

    public static final String LAST_UPDATED_BY = "last_updated_by";

    public static final String LAST_UPDATED_DATE = "last_updated_date";

    public static final String USER_ID = "user_id";

    public static final String ORDER_TYPE = "order_type";

    public static final String ORDER_MONEY = "order_money";

    public static final String AMOUNT_MONEY = "amount_money";

    public static final String PAY_TIME = "pay_time";

    public static final String VALID_DAYS = "valid_days";

    public static final String GIFT_DAYS = "gift_days";

    public static final String SUBJECT_TYPE = "subject_type";

    public static final String PAY_BATCH_NO = "pay_batch_no";

    public static final String TRADE_NO = "trade_no";

    public static final String ORDER_STATUS = "order_status";

    public static final String PAY_TYPE = "pay_type";

    public static final String REFUND_TIME = "refund_time";

    public static final String REFUND_MONEY = "refund_money";

    public static final String PAY_END = "pay_end";

    public static final String VIP_ID = "vip_id";

    public static final String PROMOTER_ID = "promoter_id";

    public static final String REMARK = "remark";

    public static final String STATUS = "status";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
